select a0.*,c.*,nom_fichier from phantom_arbre a0 inner join phantom_contenu c on a0.arbre_id=c.arbre_id and c.langue_id= inner join phantom_gabarit g on g.gabarit_id=a0.gabarit_id where c.nom ='"+items.vignette+"' and a0.etat_id=1 and a0.supprimer=0 and (a0.root=1 or a0.root is null)
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'inner join phantom_gabarit g on g.gabarit_id=a0.gabarit_id where c.nom ='' at line 4